function string_contains_char(c, s, n) {
    var count = 0;

    for (var i = 0; i < n; i++)
        if (s[i] == c)
            count++;

    return count;
}

var s = "Opposition groups in Bahrain as well as politicians, rights groups and many F1 fans around the world want Sundays Grand Prix  which could be watched by a global audience of more than 500 million  to be canceled while the Gulf state braces itself for more violent demonstrations after months of political unrest. \nProtesters see the race as a publicity stunt by the countrys rulers to make the nation seem";

var result = string_contains_char('u', s, s.length);
